package com.xlh.dao.courseTest.helper;

import com.xlh.dao.courseTest.CourseTestPaperClassMapper;
import com.xlh.pojo.courseTest.CourseTestPaperClass;
import com.xlh.pojo.courseTest.CourseTestPaperClassExample;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public class CourseTestPaperClassMapperHelper {

    @Autowired
    private CourseTestPaperClassMapper courseTestPaperClassMapper;


    public List<CourseTestPaperClass> listByPaperIds(List<Long> paperIds){

        CourseTestPaperClassExample courseTestPaperClassExample = new CourseTestPaperClassExample();
        courseTestPaperClassExample.createCriteria().andPaperIdIn(paperIds);
        List<CourseTestPaperClass> courseTestPaperClasses = courseTestPaperClassMapper.selectByExample(courseTestPaperClassExample);

        return courseTestPaperClasses;
    }


    public List<CourseTestPaperClass> listByClassIds(List<Long> classIds) {

        CourseTestPaperClassExample courseTestPaperClassExample = new CourseTestPaperClassExample();
        courseTestPaperClassExample.createCriteria().andClassIdIn(classIds);
        List<CourseTestPaperClass> courseTestPaperClassList = courseTestPaperClassMapper.selectByExample(courseTestPaperClassExample);
        return courseTestPaperClassList;
    }

}
